Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

librustc_typeck: remove loop that never actually loops #69430

Merged
merged 1 commit into from
Feb 28, 2020

Conversation

matthiaskrgr
Copy link
Member

No description provided.

@rust-highfive
Copy link
Collaborator

r? @cramertj

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 24, 2020
@@ -2358,10 +2358,10 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
break;
}
}
for binding in segment.generic_args().bindings {

if let Some(binding) = segment.generic_args().bindings.get(0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if let Some(binding) = segment.generic_args().bindings.get(0) {
if let [binding, ..] = segment.generic_args().bindings {

Although cc @varkor re. whether this weird break was correct in the first place. I think this deserves a comment at any rate.

@cramertj
Copy link
Member

r? @varkor

@@ -2358,10 +2358,11 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o {
break;
}
}
for binding in segment.generic_args().bindings {

// only emit the first error to avoid overloading the user with error msgs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// only emit the first error to avoid overloading the user with error msgs
// Only emit the first error to avoid overloading the user with error messages.

We generally prefer full sentences for consistency.
r=me after fixing.

@varkor
Copy link
Member

varkor commented Feb 27, 2020

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 27, 2020

📌 Commit b6f0567 has been approved by varkor

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 27, 2020
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this pull request Feb 27, 2020
librustc_typeck: remove loop that never actually loops
bors added a commit that referenced this pull request Feb 27, 2020
Rollup of 8 pull requests

Successful merges:

 - #60826 (Implement new gdb/lldb pretty-printers)
 - #69255 (Add more context to E0599 errors)
 - #69379 (Fail on multiple declarations of `main`.)
 - #69430 (librustc_typeck: remove loop that never actually loops)
 - #69449 (Do not ping PR reviewers in toolstate breakage)
 - #69491 (rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messages)
 - #69495 (don't take redundant references to operands)
 - #69496 (use find(x) instead of filter(x).next())

Failed merges:

r? @ghost
bors added a commit that referenced this pull request Feb 28, 2020
Rollup of 9 pull requests

Successful merges:

 - #69379 (Fail on multiple declarations of `main`.)
 - #69430 (librustc_typeck: remove loop that never actually loops)
 - #69449 (Do not ping PR reviewers in toolstate breakage)
 - #69491 (rustc_span: Add `Symbol::to_ident_string` for use in diagnostic messages)
 - #69495 (don't take redundant references to operands)
 - #69496 (use find(x) instead of filter(x).next())
 - #69501 (note that find(f) is equivalent to filter(f).next() in the docs.)
 - #69527 (Ignore untracked paths when running `rustfmt` on repository.)
 - #69529 (don't use .into() to convert types into identical types.)

Failed merges:

r? @ghost
@bors bors merged commit 84f5bcc into rust-lang:master Feb 28, 2020
@matthiaskrgr matthiaskrgr deleted the noloop branch February 29, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants